package com.moyou.weichat.listener;

import android.os.Handler;
import android.os.Message;

import com.moyou.weichat.RegisterActivity;
import com.moyou.weichat.utils.ConstantUtils;

/**
 * Created by Administrator on 2017/10/16 0016.
 */

public class HxRegisterHandler  extends Handler{
    private RegisterActivity registerActivity;

    public HxRegisterHandler(RegisterActivity registerActivity) {
        this.registerActivity = registerActivity;
    }

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        switch (msg.what){
            case ConstantUtils.HANDLER_SUCCESS:
                registerActivity.dialogDiss();
                registerActivity.showToast("注册成功!");
                registerActivity.finish();
                break;
            case ConstantUtils.HANDLER_Fali:
                registerActivity.showToast("注册失败!");
                registerActivity.dialogDiss();
                break;
        }
    }
}
